package defpackage; import java.io.IOException; import java.util.ArrayList; import org.apache.commons.httpclient.cookie.CookiePolicy; /* renamed from: oft reason: default package */ public final class oft extends ogi implements mth { static final Object[] quL = {1, "single", 2, "words", 3, "double", 4, "thick", 5, "dotted", 6, "dottedHeavy", 7, "dash", 8, "dashedHeavy", 9, "dashLong", 10, "dashLongHeavy", 11, "dotDash", 12, "dashDotHeavy", 13, "dotDotDash", 14, "dashDotDotHeavy", 15, "wave", 16, "wavyHeavy", 17, "wavyDouble", 0, "none"}; static final Object[] quM = {0, "none", 1, "dot", 2, "comma", 3, "circle", 4, "underDot"}; static final Object[] quN = {0, "none", 1, "black", 2, "blue", 3, "cyan", 4, "green", 5, "magenta", 6, "red", 7, "yellow", 8, "white", 9, "darkBlue", 10, "darkCyan", 11, "darkGreen", 12, "darkMagenta", 13, "darkRed", 14, "darkYellow", 15, "darkGray", 16, "lightGray"}; private static String Vx(int i) { for (int i2 = 0; i2 < quL.length; i2 += 2) { if (((Integer) quL[i2]).intValue() == i) { return (String) quL[i2 + 1]; } } return "none"; } private static String Vy(int i) { for (int i2 = 0; i2 < quM.length; i2 += 2) { if (((Integer) quM[i2]).intValue() == i) { return (String) quM[i2 + 1]; } } return "none"; } private static String Vz(int i) { for (int i2 = 0; i2 < quN.length; i2 += 2) { int intValue = ((Integer) quN[i2]).intValue(); String str = (String) quN[i2 + 1]; if (i == intValue) { return str; } } return "none"; } public static void a(ode ode, odf odf, kgd kgd, mdl mdl) { odf.i("w:rPr", new String[0]); Object sp = kgd.sp(48); if (sp != null) { mzt mzt = (mzt) sp; b(ode, odf, kgd.b(kgd, mzt.oPf), mdl); ew.assertNotNull("revision should not be null!", mzt); ew.assertNotNull("dctx should not be null!", ode); ew.assertNotNull("w should not be null!", odf); ew.assertNotNull("rPrChange should not be null!", kgd); ode.a("w:rPrChange", mzt, odf); if (!ode.Y(kgd)) { odf.i("w:rPr", new String[0]); b(ode, odf, kgd, mdl); odf.endElement("w:rPr"); } odf.endElement("w:rPrChange"); } else { b(ode, odf, kgd, mdl); } odf.endElement("w:rPr"); } private static void a(odf odf, kgd kgd, int i) { Object sp = kgd.sp(i); if (sp != null && ((String) sp).length() > 0) { odf.MT((String) sp); } } public static void a(odo odo, kgd kgd) { String str; String str2; if (kgd != null) { kfz kfz = new kfz(); kfz.a(kgd, 151, 171); if (!kfz.lXN.isEmpty()) { odo.i("m:rPr", new String[0]); ew.assertNotNull("mathRpr should not be null", kgd); ew.assertNotNull("w should not be null", odo); Object sp = kgd.sp(152); if (sp != null) { String[] strArr = new String[2]; strArr[0] = "m:val"; switch (((Integer) sp).intValue()) { case 1: str2 = "b"; break; case 2: str2 = "bi"; break; case 3: str2 = "i"; break; case 4: str2 = "p"; break; default: str2 = "p"; ew.fail(); break; } strArr[1] = str2; odo.j("m:sty", strArr); } Object sp2 = kgd.sp(153); if (sp2 != null) { odo.j("m:aln", "m:val", ogi.zN(((Boolean) sp2).booleanValue())); } Object sp3 = kgd.sp(154); if (sp3 != null) { odo.j("m:brk", "m:alnAt", String.valueOf((Integer) sp3)); } Object sp4 = kgd.sp(155); if (sp4 != null) { odo.j("m:lit", "m:val", ogi.zN(((Boolean) sp4).booleanValue())); } Object sp5 = kgd.sp(156); if (sp5 != null) { odo.j("m:nor", "m:val", ogi.zN(((Boolean) sp5).booleanValue())); } Object sp6 = kgd.sp(157); if (sp6 != null) { switch (((Integer) sp6).intValue()) { case 1: str = "double-struck"; break; case 2: str = "fraktur"; break; case 3: str = "monospace"; break; case 4: str = "roman"; break; case 5: str = "sans-serif"; break; case 6: str = "script"; break; default: str = null; ew.eI(); break; } if (str != null) { odo.j("m:scr", "m:val", str); } } odo.endElement("m:rPr"); } } } public static void b(ode ode, odf odf, kgd kgd) { if (kgd != null && !ode.Y(kgd)) { odf.i("w:rPr", new String[0]); Object sp = kgd.sp(48); if (sp != null) { mzt mzt = (mzt) sp; kgd kgd2 = mzt.oPf; if (4095 != kgd2.getInt(2, 4095)) { c(ode, odf, kgd2); } else { c(ode, odf, kgd.b(kgd, kgd2)); } ew.assertNotNull("revision should not be null!", mzt); ew.assertNotNull("dctx should not be null!", ode); ew.assertNotNull("w should not be null!", odf); ew.assertNotNull("rPrChange should not be null!", kgd); ode.a("w:rPrChange", mzt, odf); if (!ode.Y(kgd)) { odf.i("w:rPr", new String[0]); c(ode, odf, kgd); odf.endElement("w:rPr"); } odf.endElement("w:rPrChange"); } else { c(ode, odf, kgd); } odf.endElement("w:rPr"); } } private static void b(ode ode, odf odf, kgd kgd, mdl mdl) { if (kgd != null && !ode.Y(kgd)) { odi odi = ode.qsW; odi.a(kgd, odf); odi.b(kgd, odf); c(ode, odf, kgd); } } /* JADX WARNING: Removed duplicated region for block: B:200:0x04c9 A[Catch:{ IOException -> 0x05b3 }] */ private static void c(ode ode, odf odf, kgd kgd) { boolean z; String str; String str2; String str3; String str4; int intValue; if (kgd != null && kgd.mCount != 0) { Object sp = kgd.sp(2); if (!(sp == null || (intValue = ((Integer) sp).intValue()) == 4095)) { odf.fE("w:rStyle", ode.Vi(intValue)); } ew.assertNotNull("rPr should not be null!", kgd); ArrayList arrayList = new ArrayList(); Object sp2 = kgd.sp(3); if (sp2 != null) { arrayList.add("w:ascii"); arrayList.add((String) sp2); } Object sp3 = kgd.sp(36); if (sp3 != null) { arrayList.add("w:cs"); arrayList.add((String) sp3); } Object sp4 = kgd.sp(4); if (sp4 != null) { arrayList.add("w:eastAsia"); arrayList.add((String) sp4); } Object sp5 = kgd.sp(35); if (sp5 != null) { arrayList.add("w:hAnsi"); arrayList.add((String) sp5); } Object sp6 = kgd.sp(40); if (sp6 != null) { arrayList.add("w:hint"); int intValue2 = ((Integer) sp6).intValue(); switch (intValue2) { case 0: str4 = CookiePolicy.DEFAULT; break; case 1: str4 = "eastAsia"; break; case 2: str4 = "cs"; break; default: new StringBuilder("Unexpected IdctHint value in core: ").append(intValue2); ew.eI(); str4 = CookiePolicy.DEFAULT; break; } arrayList.add(str4); } if (arrayList.size() != 0) { odf.j("w:rFonts", (String[]) arrayList.toArray(new String[arrayList.size()])); } Object sp7 = kgd.sp(5); if (sp7 != null) { odf.aG("w:b", ((Boolean) sp7).booleanValue()); } Object sp8 = kgd.sp(38); if (sp8 != null) { odf.aG("w:bCs", ((Boolean) sp8).booleanValue()); } Object sp9 = kgd.sp(6); if (sp9 != null) { odf.aG("w:i", ((Boolean) sp9).booleanValue()); } Object sp10 = kgd.sp(39); if (sp10 != null) { odf.aG("w:iCs", ((Boolean) sp10).booleanValue()); } Object sp11 = kgd.sp(17); if (sp11 != null) { odf.aG("w:caps", ((Boolean) sp11).booleanValue()); } Object sp12 = kgd.sp(16); if (sp12 != null) { odf.aG("w:smallCaps", ((Boolean) sp12).booleanValue()); } Object sp13 = kgd.sp(7); if (sp13 != null) { int intValue3 = ((Integer) sp13).intValue(); if (intValue3 == 0) { odf.aG("w:strike", false); } else if (intValue3 == 1) { odf.aG("w:strike", true); } else if (intValue3 == 2) { odf.aG("w:dstrike", true); } } Object sp14 = kgd.sp(21); if (sp14 != null) { odf.aG("w:outline", ((Boolean) sp14).booleanValue()); } Object sp15 = kgd.sp(63); if (sp15 != null) { odf.aG("w:shadow", ((Boolean) sp15).booleanValue()); } Object sp16 = kgd.sp(66); if (sp16 != null) { odf.aG("w:emboss", ((Boolean) sp16).booleanValue()); } Object sp17 = kgd.sp(65); if (sp17 != null) { odf.aG("w:imprint", ((Boolean) sp17).booleanValue()); } Object sp18 = kgd.sp(69); if (sp18 != null) { odf.aG("w:noProof", ((Boolean) sp18).booleanValue()); } Object sp19 = kgd.sp(27); if (sp19 != null) { odf.aG("w:snapToGrid", ((Boolean) sp19).booleanValue()); } Object sp20 = kgd.sp(18); if (sp20 != null) { odf.aG("w:vanish", ((Boolean) sp20).booleanValue()); } Object sp21 = kgd.sp(60); if (sp21 != null) { odf.aG("w:webHidden", ((Boolean) sp21).booleanValue()); } Object sp22 = kgd.sp(11); if (sp22 != null) { odf.fE("w:color", Sb(((Integer) sp22).intValue())); } Object sp23 = kgd.sp(24); if (sp23 != null) { odf.aO("w:spacing", (int) (((Float) sp23).floatValue() * 20.0f)); } Object sp24 = kgd.sp(23); if (sp24 != null) { odf.aO("w:w", (int) (((Float) sp24).floatValue() * 100.0f)); } Object sp25 = kgd.sp(26); if (sp25 != null) { odf.aO("w:kern", (int) (((Float) sp25).floatValue() * 2.0f)); } Object sp26 = kgd.sp(25); if (sp26 != null) { odf.aO("w:position", (int) (((Float) sp26).floatValue() * 2.0f)); } Object sp27 = kgd.sp(10); if (sp27 != null) { odf.aO("w:sz", (int) (((Float) sp27).floatValue() * 2.0f)); } Object sp28 = kgd.sp(37); if (sp28 != null) { odf.aO("w:szCs", (int) (((Float) sp28).floatValue() * 2.0f)); } Object sp29 = kgd.sp(15); if (sp29 != null) { odf.fE("w:highlight", Vz(((Integer) sp29).intValue())); } Object sp30 = kgd.sp(8); Object sp31 = kgd.sp(9); if (!(sp30 == null && sp31 == null)) { if (sp30 != null) { int intValue4 = ((Integer) sp30).intValue(); if (sp31 == null) { odf.fE("w:u", Vx(intValue4)); } else { odf.j("w:u", "w:val", Vx(intValue4), "w:color", Sb(((Integer) sp31).intValue())); } } else { odf.j("w:u", "w:color", Sb(((Integer) sp31).intValue())); } } Object sp32 = kgd.sp(67); if (sp32 != null) { switch (((Integer) sp32).intValue()) { case 0: str3 = "none"; break; case 1: str3 = "lights"; break; case 2: str3 = "blinkBackground"; break; case 3: str3 = "sparkle"; break; case 4: str3 = "antsBlack"; break; case 5: str3 = "antsRed"; break; case 6: str3 = "shimmer"; break; default: ew.eI(); str3 = "none"; break; } odf.fE("w:effect", str3); } if (kgd.sp(68) != null) { a((myn) kgd.sp(68), "w:bdr", odf); } Object sp33 = kgd.sp(14); if (sp33 != null) { a(odf, (evq) sp33); } Object sp34 = kgd.sp(70); if (sp34 != null) { mze mze = (mze) sp34; odf.j("w:fitText", "w:val", Integer.toString((int) (mze.puZ * 20.0f)), "w:id", Integer.toString(mze.puY)); } Object sp35 = kgd.sp(13); if (sp35 != null) { switch (((Integer) sp35).intValue()) { case 1: str2 = "superscript"; break; case 2: str2 = "subscript"; break; default: str2 = "baseline"; break; } odf.fE("w:vertAlign", str2); } Object sp36 = kgd.sp(57); if (!(sp36 == null || naj.OFF == ((naj) sp36))) { odf.j("w:rtl", new String[0]); } Object sp37 = kgd.sp(72); if (sp37 != null) { odf.aG("w:cs", ((Boolean) sp37).booleanValue()); } Object sp38 = kgd.sp(12); if (sp38 != null) { odf.fE("w:em", Vy(((Integer) sp38).intValue())); } ew.assertNotNull("rPr should not be null!", kgd); ArrayList arrayList2 = new ArrayList(); Object sp39 = kgd.sp(41); if (sp39 != null && ((Integer) sp39).intValue() > 1024) { arrayList2.add("w:val"); arrayList2.add(mzk.pvC.get(sp39)); } Object sp40 = kgd.sp(43); if (sp40 != null && ((Integer) sp40).intValue() > 1024) { arrayList2.add("w:bidi"); arrayList2.add(mzk.pvC.get(sp40)); } Object sp41 = kgd.sp(42); if (sp41 != null && ((Integer) sp41).intValue() > 1024) { arrayList2.add("w:eastAsia"); arrayList2.add(mzk.pvC.get(sp41)); } if (arrayList2.size() != 0) { odf.j("w:lang", (String[]) arrayList2.toArray(new String[arrayList2.size()])); } Object sp42 = kgd.sp(71); if (sp42 != null) { mzc mzc = (mzc) sp42; ew.assertNotNull("eastAsianLayout should not be null!", mzc); String[] strArr = new String[6]; strArr[0] = "w:id"; strArr[1] = Integer.toString(mzc.puK); int i = mzc.puL; if (i == 2) { strArr[2] = "w:combine"; strArr[3] = zN(true); strArr[4] = "w:combineBrackets"; switch (mzc.puN) { case 0: str = "none"; break; case 1: str = "round"; break; case 2: str = "square"; break; case 3: str = "angle"; break; case 4: str = "curly"; break; default: str = "none"; break; } strArr[5] = str; } else if (i == 1) { strArr[2] = "w:vert"; strArr[3] = zN(true); strArr[4] = "w:vertCompress"; strArr[5] = zL(mzc.puM); } odf.j("w:eastAsianLayout", strArr); } Object sp43 = kgd.sp(61); if (sp43 != null) { odf.aG("w:specVanish", ((Boolean) sp43).booleanValue()); } Object sp44 = kgd.sp(105); if (sp44 != null) { eut eut = (eut) sp44; if (!eut.isEmpty()) { int i2 = kgd.getInt(11, -16777216); try { eui yj = eut.yj(); if (yj != null) { new ody(odf, yj, "w14:", true).dnS(); } euo yi = eut.yi(); if (yi != null) { if (yi.fls) { new oej(odf, (eup) yi, "w14:").dnS(); } else { new oei(odf, yi, "w14:", true).dnS(); } } eun baW = eut.baW(); if (baW != null) { new oeh(odf, baW, "w14:").dnS(); } ewc bls = eut.bls(); if (bls != null) { new oeo(odf, bls, "w14:", true, null).dnS(); } euw bbd = eut.bbd(); if (bbd != null) { if (bbd.blW() == 0) { evs evs = (evs) bbd; if (i2 == evs.getColor() && 0.0f == evs.blX()) { z = true; if (!z) { new oen(odf, bbd).dnS(); } } } z = false; if (!z) { } } } catch (IOException e) { } } } a(odf, kgd, 80); a(odf, kgd, 81); a(odf, kgd, 82); a(odf, kgd, 83); a(odf, kgd, 84); a(odf, kgd, 85); a(kgd, 86, "w14:cntxtAlts xmlns:w14=\"http://schemas.microsoft.com/office/word/2010/wordml\"", odf); } } public static String w(Integer num) { switch (num.intValue()) { case 1: return "centerGroup"; case 2: return "center"; case 3: return "left"; case 4: return "right"; default: ew.eI(); return "centerGroup"; } } }